﻿//程琳 2012-10-27
using System.Collections.Generic;
using Microhard.Permission.Models;
using Microhard.Core.DBUtility;


namespace Microhard.Permission.Interface
{

    /// <summary>
    /// 用户管理
    /// </summary>
    /// <typeparam name="T"></typeparam>
    public interface IUser : IRepository<User>
    {
        void SignIn(string userName, bool createPersistentCookie);
        void SignOut();
        bool ValidatUser(string userName,string pwd);
        bool ChangePassword(string userName, string oldPassword, string newPassword);
        ValidationResult MailValidating(User model);
        ValidationResult UserNameValidating(User model);
        bool IsAdmin(string userName);
        User GetUserByName(string userName);
    }
}